package Test.io.io;

import java.net.Socket;
import java.util.Date;

/**
 * @Title: ecology-idea
 * @Company: 泛微软件
 * @author: weaver.Dusongsong
 * @version: 1.0
 * @CreateDate: 2022-04-24
 * @Description: ${description}
 * @ModifyLog:
 **/

public class IOClient {
    public static void main(String[] args) {
        new Thread( ()->{
            try {
                Socket socket = new Socket("127.0.0.1", 8000);
                while (true){
                    socket.getOutputStream().write((new Date()+": hello world!").getBytes());
                    Thread.sleep( 2000 );
                }
            }catch (Exception e){

            }
        } ).start();
    }
}
